﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FridgeManagerApp
{
    [DataContract]
    public class WDeviceCell : NotificationObject
    {
        private int number;
        private String cellUID;
        private int deviceUID;
        private String dominoUID;

        [DataMember(Order = 0)]
        public int Number
        {
            get
            {
                return number;
            }
            set
            {
                number = value;
                RaisePropertyChanged("Number");
            }
        }

        [DataMember(Order = 1)]
        public String CellUID
        {
            get
            {
                return cellUID;
            }
            set
            {
                cellUID = value;
                RaisePropertyChanged("CellUID");
            }
        }

        [DataMember(Order = 2)]
        public int DeviceUID
        {
            get
            {
                return deviceUID;
            }
            set
            {
                deviceUID = value;
                RaisePropertyChanged("DeviceUID");
            }
        }

        [DataMember(Order = 3)]
        public String DominoUID
        {
            get
            {
                return dominoUID;
            }
            set
            {
                dominoUID = value;
                RaisePropertyChanged("DominoUID");
            }
        }

        public WDeviceCell()
        {
            Number = -1;
            CellUID = "";
            DeviceUID = -1;
            DominoUID = "";
        }

        public WDeviceCell(LDeviceCell p)
        {
            Number = p.Number;
            CellUID = p.CellUID;
            DeviceUID = p.DeviceUID;
            DominoUID = p.DominoUID;
        }
    }
}
